package com.bolang.onlycode.demo.designPatterns.Strategy;

import java.math.BigDecimal;


public class Cashier {
    /**
     * 会员，策略对象
     */
    private Member member;

    public Cashier(Member member) {
        this.member = member;
    }

    /**
     * 计算应付价格
     * @param bookPrice
     * @return
     */
    public BigDecimal calculate(BigDecimal bookPrice) {
        return this.member.calPrice(bookPrice);
    }
}
